import Vue from 'vue'
import Vuex from 'vuex'

//挂载vuex
Vue.use(Vuex);

 const  store = new Vuex.Store({
  //存放的键值对就是要管理的状态等同于data
  state: {
    grades: "",
  },
  mutations: {
    //参数2是用户传递的数据
    setGrades(state, data) {
      state.grades = data;
    },
  }
})

export default store;
